import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import './assets/css/global.css'
import './plugins/element.js'
import './assets/fonts/iconfont.css'
import "babel-polyfill"

/*配置axios根路径*/
axios.defaults.baseURL="http://127.0.0.1:9090/"

/*axios 请求拦截器，为每个ajax请求增加Authorization请求头字段*/
axios.interceptors.request.use(config => {

  /*为每个ajax请求增加Authorization请求头字段*/
  config.headers.Authorization = window.sessionStorage.getItem('token');
  return config

})

Vue.prototype.$http=axios;





Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
